package com.example.hlddz2.model;

import java.util.Date;
import java.util.List;

public class Order {
    private String orderNo; // 移除static修饰符
    private List<OrderItem> items;
    private double totalPrice;
    private String status;
    private Date createTime;

    public String getOrderNo() { return orderNo; }
    public void setOrderNo(String orderNo) { this.orderNo = orderNo; }

    public List<OrderItem> getItems() { return items; }
    public void setItems(List<OrderItem> items) { this.items = items; }

    public double getTotalPrice() { return totalPrice; }
    public void setTotalPrice(double totalPrice) { this.totalPrice = totalPrice; }

    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }

    public Date getCreateTime() { return createTime; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }

    public static class OrderItem {
        private int goodsId;
        private String name;
        private double price;
        private String image;
        private int count;

        public int getGoodsId() { return goodsId; }
        public void setGoodsId(int goodsId) { this.goodsId = goodsId; }

        public String getName() { return name; }
        public void setName(String name) { this.name = name; }

        public double getPrice() { return price; }
        public void setPrice(double price) { this.price = price; }

        public String getImage() { return image; }
        public void setImage(String image) { this.image = image; }

        public int getCount() { return count; }
        public void setCount(int count) { this.count = count; }
    }
}